<template>
  <a-layout-content v-loading="loading">
    <router-view v-if="loading2"></router-view>
  </a-layout-content>
</template>

<script>
import { mapActions, mapGetters } from "vuex";
export default {
  name: "wechat",
  data() {
    return {
      loading: false,
      loading2: false,
      paths: [
        {
          name: "微信",
          path: "/wechat"
        }
      ]
    };
  },
  computed: mapGetters("weixin", ["getstart"]),
  async mounted() {
    if (!this.getstart) {
      this.loading = true;
      await this.actionwechattemp();
      // await this.$store.dispatch("weixin/actionfans");
      await this.$store.dispatch("weixin/actiontemplate");
      await this.$store.dispatch("weixin/actiontags");
      this.$store.dispatch("weixin/actionstart");
      this.loading = false;
    }
    this.loading2 = true;
  },
  methods: mapActions(["actionwechattemp"])
};
</script>
